﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Google.KML;

namespace MSAProject
{
   class TerrainFieldGenerator
   {
       private double initialLatitude = 8.00;
       private double initialLongitude = 50.01;
       private int initialHeight = 0;
   
       public TerrainFieldGenerator()
    {

    }

       public List<TerrainField> GenerateFields(int count)
        {
            var terrainFields = new List<TerrainField>();

           for (int i=0; i<count; i++)
           {
               var tf = new TerrainField(new geCoordinates(new geAngle90(initialLongitude), new geAngle180(initialLatitude), initialHeight), new geCoordinates(new geAngle90(initialLongitude+0.511),
                new geAngle180(initialLatitude), initialHeight), new geCoordinates(new geAngle90(initialLongitude),
                    new geAngle180(initialLatitude + 0.511), initialHeight), new geCoordinates(new geAngle90(initialLongitude+ 0.511), new geAngle180(initialLatitude + 0.511), initialHeight));
              // initialLongitude;
               initialLatitude += 0.511;
              ;
               initialHeight += 50;
               terrainFields.Add(tf);
           }

           return terrainFields;
        }
    }
}
